<template>
  <div class="ele-body">
    <!-- 头部展示 -->
    <headPreview></headPreview>
    <el-card style="margin-top: 50px;"
             shadow="never">
      <el-tabs v-model="activeName"
               @tab-click="handleClick">

        <el-tab-pane label="线上扫码"
                     name="1">
          <orderTableList @searchIndex="index"
                          :active="activeName"></orderTableList>
        </el-tab-pane>
        <el-tab-pane label="线下操作"
                     name="2">
          <orderTableList @searchIndex="index"
                          :active="activeName"></orderTableList>
        </el-tab-pane>
        <el-tab-pane label="在线充值"
                     name="3">
          <orderTableList @searchIndex="index"
                          :active="activeName"></orderTableList>
        </el-tab-pane>
        <el-tab-pane label="余额"
                     name="4">
          <orderTableList @searchIndex="index"
                          :active="activeName"></orderTableList>
        </el-tab-pane>

      </el-tabs>
    </el-card>
  </div>
</template>
<script>


import headPreview from './components/headerPreview.vue'
import orderTableList from './components/orderTableList.vue';
export default {
  name: 'FormBasic',
  components: {
    headPreview,
    orderTableList

  },
  data () {
    return {
      activeName: '1',
    };
  },
  methods: {
    handleClick (e) {
      console.log(e, 'w')

    },
    index (e) {
      this.activeName = String(Number(e) + 1)
    }
    /* 关闭当前页面 */

  }
};
</script>
 <style lang="less" scoped>
</style>